package alittlepond;

import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.UIManager.LookAndFeelInfo;

import alittlepond.gui.SettingsWindow;
import alittlepond.gui.WorldWindow;
import alittlepond.world.World;
import sun.security.acl.WorldGroupImpl;

/**
 * 
 * Main class, just gets the ball rolling.
 * 
 * 
 * @author hopey
 *
 */
public class Main {

	/**
	 * @param args
	 * @throws UnsupportedLookAndFeelException 
	 * @throws IllegalAccessException 
	 * @throws InstantiationException 
	 * @throws ClassNotFoundException 
	 */
	public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {

        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                go();
            }
        });
    }
		
	
	private static void go() {
		
		for(LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
			System.out.println(info.getClassName());
		}
		
		try {
			UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); //Mine doesn't seem to work.
//			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (Exception e) {
			e.printStackTrace();
			try {
				UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
			} catch (Exception e1) {
				e1.printStackTrace();
			}
		}

		new InitWindow().setVisible(true);
		
	}

}
